3.115 \(\int \frac {x (e+f x)^n}{(a+b x) (c+d x)} \, dx\)

Optimal. Leaf size=124 \[ \frac {a (e+f x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b (e+f x)}{b e-a f}\right )}{(n+1) (b c-a d) (b e-a f)}-\frac {c (e+f x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {d (e+f x)}{d e-c f}\right )}{(n+1) (b c-a d) (d e-c f)} \]

[Out]

a*(f*x+e)^(1+n)*hypergeom([1, 1+n],[2+n],b*(f*x+e)/(-a*f+b*e))/(-a*d+b*c)/(-a*f+b*e)/(1+n)-c*(f*x+e)^(1+n)*hyp
ergeom([1, 1+n],[2+n],d*(f*x+e)/(-c*f+d*e))/(-a*d+b*c)/(-c*f+d*e)/(1+n)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {156, 68} \[ \frac {a (e+f x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b (e+f x)}{b e-a f}\right )}{(n+1) (b c-a d) (b e-a f)}-\frac {c (e+f x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {d (e+f x)}{d e-c f}\right )}{(n+1) (b c-a d) (d e-c f)} \]

Antiderivative was successfully verified.

[In]

Int[(x*(e + f*x)^n)/((a + b*x)*(c + d*x)),x]

[Out]

(a*(e + f*x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/((b*c - a*d)*(b*e - a*f)*(
1 + n)) - (c*(e + f*x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, (d*(e + f*x))/(d*e - c*f)])/((b*c - a*d)*(d*
e - c*f)*(1 + n))

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 156

Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :>
 Dist[(b*g - a*h)/(b*c - a*d), Int[(e + f*x)^p/(a + b*x), x], x] - Dist[(d*g - c*h)/(b*c - a*d), Int[(e + f*x)
^p/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]

Rubi steps

\begin {align*} \int \frac {x (e+f x)^n}{(a+b x) (c+d x)} \, dx &=-\frac {a \int \frac {(e+f x)^n}{a+b x} \, dx}{b c-a d}+\frac {c \int \frac {(e+f x)^n}{c+d x} \, dx}{b c-a d}\\ &=\frac {a (e+f x)^{1+n} \, _2F_1\left (1,1+n;2+n;\frac {b (e+f x)}{b e-a f}\right )}{(b c-a d) (b e-a f) (1+n)}-\frac {c (e+f x)^{1+n} \, _2F_1\left (1,1+n;2+n;\frac {d (e+f x)}{d e-c f}\right )}{(b c-a d) (d e-c f) (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 116, normalized size = 0.94 \[ \frac {(e+f x)^{n+1} \left (a (c f-d e) \, _2F_1\left (1,n+1;n+2;\frac {b (e+f x)}{b e-a f}\right )+c (b e-a f) \, _2F_1\left (1,n+1;n+2;\frac {d (e+f x)}{d e-c f}\right )\right )}{(n+1) (b c-a d) (b e-a f) (c f-d e)} \]

Antiderivative was successfully verified.

[In]

Integrate[(x*(e + f*x)^n)/((a + b*x)*(c + d*x)),x]

[Out]

((e + f*x)^(1 + n)*(a*(-(d*e) + c*f)*Hypergeometric2F1[1, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)] + c*(b*e -
a*f)*Hypergeometric2F1[1, 1 + n, 2 + n, (d*(e + f*x))/(d*e - c*f)]))/((b*c - a*d)*(b*e - a*f)*(-(d*e) + c*f)*(
1 + n))

________________________________________________________________________________________

fricas [F]  time = 0.95, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (f x + e\right )}^{n} x}{b d x^{2} + a c + {\left (b c + a d\right )} x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x+e)^n/(b*x+a)/(d*x+c),x, algorithm="fricas")

[Out]

integral((f*x + e)^n*x/(b*d*x^2 + a*c + (b*c + a*d)*x), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (f x + e\right )}^{n} x}{{\left (b x + a\right )} {\left (d x + c\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x+e)^n/(b*x+a)/(d*x+c),x, algorithm="giac")

[Out]

integrate((f*x + e)^n*x/((b*x + a)*(d*x + c)), x)

________________________________________________________________________________________

maple [F]  time = 0.25, size = 0, normalized size = 0.00 \[ \int \frac {x \left (f x +e \right )^{n}}{\left (b x +a \right ) \left (d x +c \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(f*x+e)^n/(b*x+a)/(d*x+c),x)

[Out]

int(x*(f*x+e)^n/(b*x+a)/(d*x+c),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (f x + e\right )}^{n} x}{{\left (b x + a\right )} {\left (d x + c\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x+e)^n/(b*x+a)/(d*x+c),x, algorithm="maxima")

[Out]

integrate((f*x + e)^n*x/((b*x + a)*(d*x + c)), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {x\,{\left (e+f\,x\right )}^n}{\left (a+b\,x\right )\,\left (c+d\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(e + f*x)^n)/((a + b*x)*(c + d*x)),x)

[Out]

int((x*(e + f*x)^n)/((a + b*x)*(c + d*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \left (e + f x\right )^{n}}{\left (a + b x\right ) \left (c + d x\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x+e)**n/(b*x+a)/(d*x+c),x)

[Out]

Integral(x*(e + f*x)**n/((a + b*x)*(c + d*x)), x)

________________________________________________________________________________________